package com.ctbu.score.domain;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * 成绩实体类
 **/
public class Score {
    private int scoId;          // 成绩ID
    private String stuId;       // 学生ID
    private String subName;     // 科目名称

    @Max(value = 100,message = "成绩最大值不能超过100")
    @Min(value = 0,message = "成绩最小值不能小于0")
    private int    scoNum;      // 成绩数值
    private String scoTerm;     // 成绩所属学期

    public Score() {
    }

    public Score(int scoId, String stuId, String subName, int scoNum, String scoTerm) {
        this.scoId = scoId;
        this.stuId = stuId;
        this.subName = subName;
        this.scoNum = scoNum;
        this.scoTerm = scoTerm;
    }

    public int getScoId() {
        return scoId;
    }

    public void setScoId(int scoId) {
        this.scoId = scoId;
    }

    public String getStuId() {
        return stuId;
    }

    public void setStuId(String stuId) {
        this.stuId = stuId;
    }

    public String getSubName() {
        return subName;
    }

    public void setSubName(String subName) {
        this.subName = subName;
    }

    public int getScoNum() {
        return scoNum;
    }

    public void setScoNum(int scoNum) {
        this.scoNum = scoNum;
    }

    public String getScoTerm() {
        return scoTerm;
    }

    public void setScoTerm(String scoTerm) {
        this.scoTerm = scoTerm;
    }

    @Override
    public String toString() {
        return "Score{" +
                "scoId=" + scoId +
                ", stuId='" + stuId + '\'' +
                ", subName='" + subName + '\'' +
                ", scoNum=" + scoNum +
                ", scoTerm='" + scoTerm + '\'' +
                '}';
    }
}
